import http from '../../../util/http.js';
//酒店房型列表
export function hotelProfileList(pagination, param) {
    let url = `/hotel/profile/list/${pagination.pageSize}/${pagination.current}`;
    return new Promise((resolve, reject) => {
        http.get(url, param).then(response => {
            resolve(response)
        });
    });
}
//新增酒店档案
export function hotelProfileAdd(data) {
    let url = `/hotel/profile/add`;
    return new Promise((resolve, reject) => {
        http.post(url, data).then(response => {
            resolve(response)
        });
    });
}
//修改酒店档案
export function hotelProfileUpdate(id, data) {
    let url = `/hotel/profile/update/${id}`;
    return new Promise((resolve, reject) => {
        http.put(url, data).then(response => {
            resolve(response)
        });
    });
}
//删除酒店档案
export function hotelProfileDelete(id) {
    let url = `/hotel/profile/delete/${id}`;
    return new Promise((resolve, reject) => {
        http.delete(url).then(response => {
            resolve(response)
        });
    });
}




//根据酒店Id 保存酒店图文秀
export function hotelArticleFind(hotelId) {
    let url = `/hotel/profile/article/${hotelId}`;
    return new Promise((resolve, reject) => {
        http.get(url).then(response => {
            resolve(response)
        });
    });
}
//根据酒店Id 保存酒店图文秀
export function hotelArticleSave(data) {
    let url = `/hotel/profile/article/save`;
    return new Promise((resolve, reject) => {
        http.post(url, data).then(response => {
            resolve(response)
        });
    });
}
//===============酒店档案===================
//酒店房型列表
export function roomTypeList(pagination, param) {
    let url = `/hotel/room/type/list/${pagination.pageSize}/${pagination.current}`;
    return new Promise((resolve, reject) => {
        http.get(url, param).then(response => {
            resolve(response)
        });
    });
}
//新增酒店房型
export function roomTypeAdd(data) {
    let url = `/hotel/room/type/add`;
    return new Promise((resolve, reject) => {
        http.post(url, data).then(response => {
            resolve(response)
        });
    });
}
//更新酒店房型
export function roomTypeUpdate(id, data) {
    let url = `/hotel/room/type/update/${id}`;
    return new Promise((resolve, reject) => {
        http.put(url, data).then(response => {
            resolve(response)
        });
    });
}
//修改酒店房型
export function roomTypeDelete(id) {
    let url = `/hotel/room/type/delete/${id}`;
    return new Promise((resolve, reject) => {
        http.delete(url).then(response => {
            resolve(response)
        });
    });
}
//===================================================
export function hotelAlbumList(pagination, param) {
    let url = `/hotel/album/list/${pagination.pageSize}/${pagination.current}`;
    return new Promise((resolve, reject) => {
        http.get(url, param).then(response => {
            resolve(response)
        });
    });
}
//新增相册
export function hotelAlbumAdd(data) {
    let url = `/hotel/album/add`;
    return new Promise((resolve, reject) => {
        http.post(url, data).then(response => {
            resolve(response)
        });
    });
}
//修改相册
export function hotelAlbumUpdate(id, data) {
    let url = `/hotel/album/update/${id}`;
    return new Promise((resolve, reject) => {
        http.put(url, data).then(response => {
            resolve(response)
        });
    });
}



//根据相册ID删除相册
export function hotelAlbumDelete(id, data) {
    let url = `/hotel/album/delete/${id}`;
    return new Promise((resolve, reject) => {
        http.delete(url, data).then(response => {
            resolve(response)
        });
    });
}


//根据相册ID获取相册图片列表
export function albumPhotoList(albumId, pagination, param) {
    let url = `/hotel/album/photo/list/${albumId}/${pagination.pageSize}/${pagination.current}`;
    return new Promise((resolve, reject) => {
        http.get(url, param).then(response => {
            resolve(response)
        });
    });
}
//添加相册图片
export function hotelAlbumPhotoAdd(data) {
    let url = `/hotel/album/photo/add`;
    return new Promise((resolve, reject) => {
        http.post(url, data).then(response => {
            resolve(response)
        });
    });
}


//删除相册图片
export function albumPhotoDelete(id) {
    let url = `/hotel/album/photo/delete/${id}`;
    return new Promise((resolve, reject) => {
        http.delete(url).then(response => {
            resolve(response)
        });
    });
}
